/*
 * @Author: 李石
 * @Date: 2024-04-28 18:13:35
 * @LastEditors: lishi
 * @LastEditTime: 2024-05-07 18:08:59
 * @Description: 
 * Copyright (c) 2024 by ${lishi0105@163.com}, All Rights Reserved. 
 */
/*
 * @function: 
 */
#ifndef TESTFACEAPI_TESTFACEAPI_FILE_UTIL_H
#define TESTFACEAPI_TESTFACEAPI_FILE_UTIL_H
#include <string>
// 文件类
class FileUtil {
public:
    typedef enum {
        FILE_TYPE_NOT_EXIST = 0,
        FILE_TYPE_UNKNOW = 1,
        FILE_TYPE_DIR,
        FILE_TYPE_DEVICE,
        FILE_TYPE_IMAGE,
        FILE_TYPE_VIDEO,
        FILE_TYPE_URL,
        FILE_TYPE_MAX
    } FILE_TYPE;
    // 从路径中读取文件buf
    static int read_file(const char* file_path, long& length,
                               char** memory);
    static std::string read_fileContent(const std::string& filePath);
    static int file_type(const char* file_path);
    static bool create_dir(const std::string &path_);
    static bool delete_directory(const std::string &path);
};
#endif
